package com.eternal.permission.service;

import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.plugins.Page;
import com.eternal.permission.entity.PermissionInfo;
import com.baomidou.mybatisplus.service.IService;
import org.springframework.context.annotation.Primary;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * <p>
 * 基础权限表 服务类
 * </p>
 *
 * @author Eternal
 * @since 2018-08-26
 */
@Primary
@Service
@Transactional
public interface PermissionInfoService extends IService<PermissionInfo> {

    /**
     * <p>  获取所有权限信息 </p>
     *
     * @Description: TODO
     * @Param `
     * @Return
     * @Author Eternal
     * @Date 2018/9/7 15:08
     */
    List<PermissionInfo> getAll();

    /**
     * <p>  分页获取权限信息 </p>
     *
     * @Description: TODO
     * @Param
     * @Return
     * @Author Eternal
     * @Date 2018/9/7 15:09
     */
    Page<PermissionInfo> getPermission(Page<PermissionInfo> page);

    /**
     * <p> 开启或关闭权限  </p>
     *
     * @Description: TODO
     * @Param
     * @Return
     * @Author Eternal
     * @Date 2018/9/7 15:10
     */
    boolean openPermission(PermissionInfo permissionInfo);

}
